//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopDispatchAutosend, MinishopDispatchAutosendResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopDispatchAutosendList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopDispatchAutosendResponse>(`/uctoo/minishop_dispatch_autosend/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopDispatchAutosend = async (id: string) => {
  return requestClient.get<MinishopDispatchAutosend>(`/uctoo/minishop_dispatch_autosend/${id}`);
};

export const adductooMinishopDispatchAutosend = async (data: Partial<MinishopDispatchAutosend>) => {
  return requestClient.post<MinishopDispatchAutosend>('/uctoo/minishop_dispatch_autosend/add', data);
};

export const edituctooMinishopDispatchAutosend = async (data: Partial<MinishopDispatchAutosend>) => {
  return requestClient.post<MinishopDispatchAutosend>('/uctoo/minishop_dispatch_autosend/edit', data);
};

export const deleteuctooMinishopDispatchAutosend = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_dispatch_autosend/del', { id });
};
